package DataModel.SegmentTree;

import java.util.ArrayList;


import DataModel.LayoutManager.CEdge;

/**
 * Interface for Segment Tree data Structure
 * which holds an edge as a as data.
 * @author Guy
 *
 */
public interface SegmentTree {

	/**
	 * Insert new edge to the tree.
	 * @param edge
	 * @return
	 */
	public boolean insert(CEdge edge);
	
	/**
	 * Removes edge from the tree.
	 * @param edge
	 * @return
	 */
	public boolean remove(CEdge edge);
	
	/**
	 * Returns root of the tree.
	 * @return
	 */
	public SegmentTreeNode getRoot();
	
	/**
	 * Performs stabbing query- returns all edges residing in the coordinate
	 * @param coord
	 * @return
	 */
	public ArrayList<Long> stabbingQuery(long coord);
	
	
	/**
	 * Range Query - returns all edges between two coords
	 * @param begin
	 * @param end
	 * @return
	 */
	public ArrayList<Long> rangeQuery(long begin, long end);
	    
}
